Filename | (eval 107)[/usr/share/perl5/Sub/Quote.pm:5] |
Statements | Executed 21 statements in 363µs |
Eval Invoked At | /usr/share/perl5/Sub/Quote.pm line 5 |
Sibling evals | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
2 | 2 | 2 | 21µs | 750µs | new | Search::Elasticsearch::Client::2_0::Direct::Indices::
1 | 1 | 1 | 13µs | 24µs | BEGIN@3.34 | Sub::Quote::
1 | 1 | 1 | 7µs | 7µs | BEGIN@6.35 | Method::Generate::Constructor::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | { | ||||
2 | 2 | 2µs | my $_QUOTED = ${$_[1]->{"\$_QUOTED"}}; | ||
3 | 2 | 59µs | 2 | 34µs | # spent 24µs (13+11) within Sub::Quote::BEGIN@3.34 which was called:
# once (13µs+11µs) by Sub::Quote::_clean_eval at line 3 # spent 24µs making 1 call to Sub::Quote::BEGIN@3.34
# spent 11µs making 1 call to warnings::unimport |
4 | # spent 750µs (21+729) within Search::Elasticsearch::Client::2_0::Direct::Indices::new which was called 2 times, avg 375µs/call:
# once (6µs+729µs) by Search::Elasticsearch::Role::Client::Direct::Main::_build_namespace at line 81 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Client/Direct/Main.pm
# once (15µs+0s) by Search::Elasticsearch::Role::Client::Direct::Main::_build_namespace at line 53 of Sub/Defer.pm | ||||
5 | package Method::Generate::Constructor; | ||||
6 | # spent 7µs within Method::Generate::Constructor::BEGIN@6.35 which was called:
# once (7µs+0s) by Sub::Quote::_clean_eval at line 11 | ||||
7 | 1 | 1µs | $^H = "2018"; | ||
8 | 1 | 500ns | ${^WARNING_BITS} = "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\003"; | ||
9 | 1 | 6µs | %^H = ( | ||
10 | ); | ||||
11 | 1 | 270µs | 1 | 7µs | } # spent 7µs making 1 call to Method::Generate::Constructor::BEGIN@6.35 |
12 | 1 | 500ns | my $class = shift; | ||
13 | 1 | 200ns | $class = ref($class) if ref($class); | ||
14 | 1 | 300ns | if ($class ne "Search::Elasticsearch::Client::2_0::Direct::Indices") { | ||
15 | if ($Moo::MAKERS{$class}) { | ||||
16 | Moo->_constructor_maker_for($class,"Search::Elasticsearch::Client::2_0::Direct::Indices"); | ||||
17 | return $class->new(@_); | ||||
18 | } elsif ($INC{"Moose.pm"} and my $meta = Class::MOP::get_metaclass_by_name($class)) { | ||||
19 | return $meta->new_object($class->BUILDARGS(@_)); | ||||
20 | } | ||||
21 | } | ||||
22 | 1 | 100ns | my $args; | ||
23 | 1 | 800ns | if ( scalar @_ == 1 ) { | ||
24 | 1 | 900ns | unless ( defined $_[0] && ref $_[0] eq 'HASH' ) { | ||
25 | die "Single parameters to new() must be a HASH ref" | ||||
26 | ." data => ". $_[0] ."\n"; | ||||
27 | } | ||||
28 | 1 | 2µs | $args = { %{ $_[0] } }; | ||
29 | } | ||||
30 | elsif ( @_ % 2 ) { | ||||
31 | die "The new() method for $class expects a hash reference or a key/value list." | ||||
32 | . " You passed an odd number of arguments\n"; | ||||
33 | } | ||||
34 | else { | ||||
35 | $args = {@_}; | ||||
36 | } | ||||
37 | 1 | 2µs | if (my @missing = grep !exists $args->{$_}, qw(logger transport)) { | ||
38 | die "Missing required arguments: ".join(', ', sort @missing); | ||||
39 | } | ||||
40 | 1 | 2µs | my $new = bless({}, $class);; | ||
41 | 1 | 4µs | if (exists $args->{"logger"}) { | ||
42 | $new->{"logger"} = $args->{"logger"}; | ||||
43 | } | ||||
44 | 1 | 600ns | if (exists $args->{"transport"}) { | ||
45 | $new->{"transport"} = $args->{"transport"}; | ||||
46 | } | ||||
47 | 1 | 5µs | return $new; | ||
48 | } | ||||
49 | 1 | 1µs | $_QUOTED->[3] = \&Search::Elasticsearch::Client::2_0::Direct::Indices::new | ||
50 | } | ||||
51 | 1 | 4µs | 1; | ||
52 | |||||
53 | ; |